const {
  DataTypes
} = require('sequelize');
module.exports = sequelize => {
  const attributes = {
    shopId: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      defaultValue: null,
      primaryKey: true,
      autoIncrement: true,
      comment: "店铺编号",
      field: "shop_id"
    },
    shopName: {
      type: DataTypes.STRING(255),
      allowNull: false,
      defaultValue: null,
      primaryKey: false,
      autoIncrement: false,
      comment: "店铺名称",
      field: "shop_name"
    },
    shopUrl: {
      type: DataTypes.STRING(255),
      allowNull: false,
      defaultValue: null,
      primaryKey: false,
      autoIncrement: false,
      comment: "店铺网址",
      field: "shop_url"
    },
    remark: {
      type: DataTypes.TEXT,
      allowNull: true,
      defaultValue: null,
      primaryKey: false,
      autoIncrement: false,
      comment: "备注;",
      field: "remark"
    }
  };
  const options = {
    tableName: "shop",
    comment: "",
    indexes: [{
      name: "unique_shop_name",
      unique: false,
      type: "BTREE",
      fields: ["shop_name"]
    }]
  };
  const ShopModel = sequelize.define("shopModel", attributes, options);
  return ShopModel;
};